text view: Make touch selection work with mouse
authorMatthias Clasen <mclasen@redhat.com>
Tue, 9 Jun 2015 19:49:10 +0000 (15:49 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 9 Jun 2015 19:49:10 +0000 (15:49 -0400)
The buttons on the popover where stealing the focus from the text
view on click, causing the popover to be dismissed before the action
was taken. Fix this by making the buttons not take focus on click.

gtk/gtktextview.c

index b1f4b47edd1b8f9cb021642f262579cc203cf612..edf47bfe9e0709ac482646e661eecabc3f43b5a3 100644 (file)
@@ -9195,6 +9195,7 @@ append_bubble_action (GtkTextView  *text_view,
   GtkWidget *item, *image;
 
   item = gtk_button_new ();
+  gtk_button_set_focus_on_click (GTK_BUTTON (item), FALSE);
   image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU);
   gtk_widget_show (image);
   gtk_container_add (GTK_CONTAINER (item), image);